import React, { memo,useEffect } from 'react'
import { withRouter } from 'react-router-dom'
import {useSelector,shallowEqual,useDispatch} from 'react-redux'
import { IntroDetailWrap } from './style'
import {getIntro} from './store/actionCreators'
const IntroDetail = memo((props) => {
  const { id, time } = props.match.params
  const dispatch = useDispatch()

  useEffect(()=>{
    dispatch(getIntro(id))
  },[dispatch])

  return (
    <IntroDetailWrap>
      推荐歌单详细页{id, time}
    </IntroDetailWrap>
  )
})

export default withRouter(IntroDetail)
